#pragma once

#include <vector>

#include "Globals.h"
#include "Scene.h"

/*!
 * \class Game
 * \brief 
 */
class Game
{
///////////////////////////////////////////////////////////////////////////////
// Attribute definition
///////////////////////////////////////////////////////////////////////////////
private:
    static bool instanceFlag;
    static Game *instance;

    static game_engine::Scene* currentScene;
    static vector<game_engine::Scene*> scenes;

///////////////////////////////////////////////////////////////////////////////
// Method definition
///////////////////////////////////////////////////////////////////////////////
public:
    // Destructor
    virtual ~Game(void);

    // Others
    void init(INT32 argc, char** argv) const throw(...);
    void run(void) const;

    static void loop(void);
	static void finalize(void);
	static void readKey(const UCHAR key, const INT32 x, 
        const INT32 y);
	static void readSpecialKey(const INT32 key, const INT32 x, 
        const INT32 y);
	static void readKeyUp(const UCHAR key, const INT32 x, 
        const INT32 y);
	static void readSpecialKeyUp(const INT32 key, const INT32 x, 
        const INT32 y);
	static void readMouse(const INT32 button, const INT32 state, 
           const INT32 x, const INT32 y);
	static void render(void);

    // Getters
    static Game* getInstance(void);

private:
    // Constructor
    Game(void);

};
